package com.ybkj.daijia.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Shine
 */
@Component
public class WeixinApi {

    public static final String GET_DRIVER_WEIXIN_SHARE_URL = "api/shareCode/getWeixinShareQrCode?driverId={1}";
    @Value("${module.weixin.url}")
    private String weixinBaseUrl;

    public String getWeixinBaseUrl() {
        return weixinBaseUrl;
    }

    public void setWeixinBaseUrl(String weixinBaseUrl) {
        if (null != weixinBaseUrl && !(weixinBaseUrl.endsWith("/") || weixinBaseUrl
            .endsWith("\\"))) {
            weixinBaseUrl += "/";
        }
        this.weixinBaseUrl = weixinBaseUrl;
    }
}
